/*
 * @Author: your name
 * @Date: 2020-04-17 17:02:39
 * @LastEditTime: 2020-06-16 16:01:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \v-nw-h5\src\store\modules\api\userOperation\userLike\mutations.js
 */
/* shareType:1,
   shareId:1,
   storeId:0,
   userId:0,
   menuId:0,
   sendShareMsg: 0*/
import Vue from 'vue';
import router from '../../../../../router/index'
export default {
    // 微信分享接口商家官网的
    async getWxUserInfo (state, obj) {
        let url1 = `${Vue.prototype.NW_API_API_LOCALE_VERSION}/store/get/shareInfo`
        await Vue.prototype.xurl.postDataJsonLoadingSync(url1, obj).then((data) => {
            console.log(data, 'getWxUserInfo');
            if (data && data.result) {
                state.wxData = data.result
            }
        })
    },
    // 微信分享好看好玩页面的
    async getWxUserInfoHKHW (state, obj) {
        let url = `${Vue.prototype.NW_API_API_LOCALE_VERSION}/media/info/share/info/get?mediaId=${obj.shareId}&userId=${Vue.prototype.userId}&thirdId=${Vue.prototype.thirdId}&queryType=${state.queryType}&terminalType=6`
        await Vue.prototype.xurl.getSync(url).then((data) => {
            console.log(data, 'getWxUserInfoHKHW');
            if (data && data.result) {
                state.wxData = data.result
            }
        })
    },
    getqueryType (state, val) {
        console.log(val, '好看好玩达人数据');
        if (val != 0 && !val) {
            return
        }
        state.queryType = val
    },
}